module PlayHelper
  def tiny_url(game)
    url = url_for(:action => :game, :id => game.id, :token => game.token, :only_path => false)
    http = Net::HTTP.new('tinyurl.com', 80)
    resp, data = http.get("/api-create.php?url=#{url}", nil)
    data
  end
end
